import { createRouter, createWebHashHistory,RouteRecordRaw } from 'vue-router'
// 路由配置类型定义，内置类型接口RouteRecordRaw
const routes:Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'Home',
        component: () => import('../views/root.vue'),
        children: [
            {
                path: '/discover',
                name: 'discover',
                component: () => import('../views/discover/index.vue')
            },
            {
                path: '/music',
                name: 'music',
                component:() => import('../views/music/index.vue')
            },
            {
                path: '/video',
                name: 'video',
                component:() => import('../views/video/index.vue')
            },
            {
                path: '/dj',
                name: 'dj',
                component:() => import('../views/dj/index.vue')
            }
        ]
    }
]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router